<!--
Date: 2025-08-13
Copyright (c) 2025 CAX Conversion Project
-->
<template>
  <div class="metadata-import">
    <Entry v-if="showEntry" @handleEvent="handleEvent" />
    <LoadExcel v-if="showLoadExcel" @handleEvent="handleEvent" />
  </div>
</template>
<script setup name="DataImport">
import Entry from './component/Entry.vue';
import LoadExcel from './component/LoadExcel.vue';

const showEntry = ref(true);
const showLoadExcel = ref(false);
const handleEvent = (data) => {
  if (data.component === 'DataImport') {
    if (data.type === 'add') {
      showEntry.value = false;
      showLoadExcel.value = true;
    }
  }
  if (data.component === 'Entry') {
    showLoadExcel.value = false;
    showEntry.value = true;
  }
};
</script>
<style lang="scss" scoped>
.metadata-import {
  height: calc(100vh - 84px);
  width: 100%;
}
</style>